0530d976772d0b8b64cb917013bdb5fe42e8eca0,gradebook/tool/src/test/org/sakaiproject/tool/gradebook/test/GradeManagerTest.java,GradeManagerTest,testGradeEvents,#,211

Before Change



        // Create a map of studentUserUids to grades
        Map map = new HashMap();
        map.put(studentId, new Double(9));

        // Saven the grades
        gradeManager.updateAssignmentGradeRecords(asgId, map);

        // Update the grades
        map.put(studentId, new Double(10));
        gradeManager.updateAssignmentGradeRecords(asgId, map);

        // Ensure that there are two grading events for this student
        GradingEvents events = gradeManager.getGradingEvents(assignment, enrollments);

After Change


        enrollments.add(new EnrollmentStandalone(new UserStandalone(studentId, null, null, null), gradebook));

        // Create a map of studentUserUids to grades
        GradeRecordSet gradeRecordSet = new GradeRecordSet(assignment);
        gradeRecordSet.addGradeRecord(new AssignmentGradeRecord(assignment, studentId, "teacherId", new Double(9)));

        // Save the grades
        gradeManager.updateAssignmentGradeRecords(gradeRecordSet);

        // Update the grades (make sure we grab them from the db, first)
        Set students = new HashSet();